from common_data import *
import sqlobject

def connectToDb():
#    sqlobject.sqlhub.processConnection = sqlobject.connectionForURI( 'mysql://root:@localhost/eus?debug=1' )
    sqlobject.sqlhub.processConnection = sqlobject.connectionForURI( 'mysql://root:@localhost/eus' )   

    XMLRPCServerConfig.createTable( ifNotExists=True )
    DNSServerConfig.createTable( ifNotExists = True )
    DNSResolver.createTable( ifNotExists = True )
    User.createTable( ifNotExists=True )
    Party.createTable( ifNotExists=True )
    Checkout.createTable( ifNotExists=True )
    Environment.createTable( ifNotExists=True )
    ResourceRecord.createTable( ifNotExists=True )
    